﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using TrailMapManager.Common;
using TrailMapManager.Common.Poi;
using TrailMapManager.Common.Track;

namespace TrailMapManager.Modules.Overview.Logic
{
    public class OverviewMainViewLogic : BaseViewLogic
    {
        public CommunicationManager CommMan
        {
            get
            {
                return CommunicationManager.Instance;
            }
        }


        public string LocalIpAddress
        {
            get
            {
                IPHostEntry host;
                string localIP = "?";
                host = Dns.GetHostEntry(Dns.GetHostName());
                foreach (IPAddress ip in host.AddressList)
                {
                    if (ip.AddressFamily == AddressFamily.InterNetwork)
                    {
                        localIP = ip.ToString();
                    }
                }
                return localIP;
            }
        }
        public TrailTrackManager TrackMan
        {
            get
            {
                return TrailTrackManager.Instance;
            }
        }

        public PoiManager PoiMan
        {
            get
            {
                return PoiManager.Instance;
            }
        }


        public OverviewMainViewLogic()
        {
            IsBusy = false;

        }
    }
}
